//
//  HDBaseViewController.m
//  HDecoration
//
//  Created by koki on 15-4-24.
//  Copyright (c) 2015年 HDecoration. All rights reserved.
//

#import "HDBaseViewController.h"


@implementation HDBaseViewController
@synthesize contentView,bgImageView;

#pragma mark - View lifecycle methods

- (void)dealloc
{
    for(UIView* view in [self.contentView subviews])
    {
        [view removeFromSuperview];
    }
    
    self.contentView=nil;
    self.bgImageView=nil;
    self.VctrID=nil;
    navBarView=nil;
    titleLable=nil;
    leftBarBtn=nil;
    rightBarBtn=nil;
    
    [[NSNotificationCenter defaultCenter] removeObserver:self];
}

-(id)init
{
    self=[super init];
    if (self)
    {
        self.VctrID=[NSNumber numberWithInt:arc4random()];
        self.view.frame=SCREENFRAME;
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    self.automaticallyAdjustsScrollViewInsets=NO;
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateViewController:) name:HDViewControllerUpdateNotification object:nil];
    
    [self initNavigationBar];
    [self initUI];
    [self testDataFunc];
}

#pragma mark - Custom event methods

-(void) initNavigationBar{}

-(void)updateViewController:(NSNotification *)note{}

-(void)initUI{}

-(void) testDataFunc{}

-(void)leftBarBtnAction{}

-(void) rightBarBtnAction{}


- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
}


@end













